(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
revconsapp(C(x1, x2), r) → revconsapp(x2, C(x1, r))
deeprevapp(C(x1, x2), rest) → deeprevapp(x2, C(x1, rest))
deeprevapp(V(n), rest) → revconsapp(rest, V(n))
deeprevapp(N, rest) → rest
revconsapp(V(n), r) → r
revconsapp(N, r) → r
deeprev(C(x1, x2)) → deeprevapp(C(x1, x2), N)
deeprev(V(n)) → V(n)
deeprev(N) → N
second(V(n)) → N
second(C(x1, x2)) → x2
isVal(C(x1, x2)) → False
isVal(V(n)) → True
isVal(N) → False
isNotEmptyT(C(x1, x2)) → True
isNotEmptyT(V(n)) → False
isNotEmptyT(N) → False
isEmptyT(C(x1, x2)) → False
isEmptyT(V(n)) → False
isEmptyT(N) → True
first(V(n)) → N
first(C(x1, x2)) → x1
goal(x) → deeprev(x)
Rewrite Strategy: INNERMOST
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
revconsapp(C(x1, x2), r) →+ revconsapp(x2, C(x1, r))
gives rise to a decreasing loop by considering the right hand sides subterm at position [].
The pumping substitution is [x2 / C(x1, x2)].
The result substitution is [r / C(x1, r)].
(2) BOUNDS(n^1, INF)
(3) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
revconsapp(C(x1, x2), r) → revconsapp(x2, C(x1, r))
deeprevapp(C(x1, x2), rest) → deeprevapp(x2, C(x1, rest))
deeprevapp(V(n), rest) → revconsapp(rest, V(n))
deeprevapp(N, rest) → rest
revconsapp(V(n), r) → r
revconsapp(N, r) → r
deeprev(C(x1, x2)) → deeprevapp(C(x1, x2), N)
deeprev(V(n)) → V(n)
deeprev(N) → N
second(V(n)) → N
second(C(x1, x2)) → x2
isVal(C(x1, x2)) → False
isVal(V(n)) → True
isVal(N) → False
isNotEmptyT(C(x1, x2)) → True
isNotEmptyT(V(n)) → False
isNotEmptyT(N) → False
isEmptyT(C(x1, x2)) → False
isEmptyT(V(n)) → False
isEmptyT(N) → True
first(V(n)) → N
first(C(x1, x2)) → x1
goal(x) → deeprev(x)
S is empty.
Rewrite Strategy: INNERMOST
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
Innermost TRS:
Rules:
revconsapp(C(x1, x2), r) → revconsapp(x2, C(x1, r))
deeprevapp(C(x1, x2), rest) → deeprevapp(x2, C(x1, rest))
deeprevapp(V(n), rest) → revconsapp(rest, V(n))
deeprevapp(N, rest) → rest
revconsapp(V(n), r) → r
revconsapp(N, r) → r
deeprev(C(x1, x2)) → deeprevapp(C(x1, x2), N)
deeprev(V(n)) → V(n)
deeprev(N) → N
second(V(n)) → N
second(C(x1, x2)) → x2
isVal(C(x1, x2)) → False
isVal(V(n)) → True
isVal(N) → False
isNotEmptyT(C(x1, x2)) → True
isNotEmptyT(V(n)) → False
isNotEmptyT(N) → False
isEmptyT(C(x1, x2)) → False
isEmptyT(V(n)) → False
isEmptyT(N) → True
first(V(n)) → N
first(C(x1, x2)) → x1
goal(x) → deeprev(x)
Types:
revconsapp :: C:V:N → C:V:N → C:V:N
C :: C:V:N → C:V:N → C:V:N
deeprevapp :: C:V:N → C:V:N → C:V:N
V :: a → C:V:N
N :: C:V:N
deeprev :: C:V:N → C:V:N
second :: C:V:N → C:V:N
isVal :: C:V:N → False:True
False :: False:True
True :: False:True
isNotEmptyT :: C:V:N → False:True
isEmptyT :: C:V:N → False:True
first :: C:V:N → C:V:N
goal :: C:V:N → C:V:N
hole_C:V:N1_0 :: C:V:N
hole_a2_0 :: a
hole_False:True3_0 :: False:True
gen_C:V:N4_0 :: Nat → C:V:N
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
revconsapp,
deeprevappThey will be analysed ascendingly in the following order:
revconsapp < deeprevapp
(8) Obligation:
Innermost TRS:
Rules:
revconsapp(
C(
x1,
x2),
r) →
revconsapp(
x2,
C(
x1,
r))
deeprevapp(
C(
x1,
x2),
rest) →
deeprevapp(
x2,
C(
x1,
rest))
deeprevapp(
V(
n),
rest) →
revconsapp(
rest,
V(
n))
deeprevapp(
N,
rest) →
restrevconsapp(
V(
n),
r) →
rrevconsapp(
N,
r) →
rdeeprev(
C(
x1,
x2)) →
deeprevapp(
C(
x1,
x2),
N)
deeprev(
V(
n)) →
V(
n)
deeprev(
N) →
Nsecond(
V(
n)) →
Nsecond(
C(
x1,
x2)) →
x2isVal(
C(
x1,
x2)) →
FalseisVal(
V(
n)) →
TrueisVal(
N) →
FalseisNotEmptyT(
C(
x1,
x2)) →
TrueisNotEmptyT(
V(
n)) →
FalseisNotEmptyT(
N) →
FalseisEmptyT(
C(
x1,
x2)) →
FalseisEmptyT(
V(
n)) →
FalseisEmptyT(
N) →
Truefirst(
V(
n)) →
Nfirst(
C(
x1,
x2)) →
x1goal(
x) →
deeprev(
x)
Types:
revconsapp :: C:V:N → C:V:N → C:V:N
C :: C:V:N → C:V:N → C:V:N
deeprevapp :: C:V:N → C:V:N → C:V:N
V :: a → C:V:N
N :: C:V:N
deeprev :: C:V:N → C:V:N
second :: C:V:N → C:V:N
isVal :: C:V:N → False:True
False :: False:True
True :: False:True
isNotEmptyT :: C:V:N → False:True
isEmptyT :: C:V:N → False:True
first :: C:V:N → C:V:N
goal :: C:V:N → C:V:N
hole_C:V:N1_0 :: C:V:N
hole_a2_0 :: a
hole_False:True3_0 :: False:True
gen_C:V:N4_0 :: Nat → C:V:N
Generator Equations:
gen_C:V:N4_0(0) ⇔ V(hole_a2_0)
gen_C:V:N4_0(+(x, 1)) ⇔ C(V(hole_a2_0), gen_C:V:N4_0(x))
The following defined symbols remain to be analysed:
revconsapp, deeprevapp
They will be analysed ascendingly in the following order:
revconsapp < deeprevapp
(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
revconsapp(
gen_C:V:N4_0(
n6_0),
gen_C:V:N4_0(
b)) →
gen_C:V:N4_0(
+(
n6_0,
b)), rt ∈ Ω(1 + n6
0)
Induction Base:
revconsapp(gen_C:V:N4_0(0), gen_C:V:N4_0(b)) →RΩ(1)
gen_C:V:N4_0(b)
Induction Step:
revconsapp(gen_C:V:N4_0(+(n6_0, 1)), gen_C:V:N4_0(b)) →RΩ(1)
revconsapp(gen_C:V:N4_0(n6_0), C(V(hole_a2_0), gen_C:V:N4_0(b))) →IH
gen_C:V:N4_0(+(+(b, 1), c7_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(10) Complex Obligation (BEST)
(11) Obligation:
Innermost TRS:
Rules:
revconsapp(
C(
x1,
x2),
r) →
revconsapp(
x2,
C(
x1,
r))
deeprevapp(
C(
x1,
x2),
rest) →
deeprevapp(
x2,
C(
x1,
rest))
deeprevapp(
V(
n),
rest) →
revconsapp(
rest,
V(
n))
deeprevapp(
N,
rest) →
restrevconsapp(
V(
n),
r) →
rrevconsapp(
N,
r) →
rdeeprev(
C(
x1,
x2)) →
deeprevapp(
C(
x1,
x2),
N)
deeprev(
V(
n)) →
V(
n)
deeprev(
N) →
Nsecond(
V(
n)) →
Nsecond(
C(
x1,
x2)) →
x2isVal(
C(
x1,
x2)) →
FalseisVal(
V(
n)) →
TrueisVal(
N) →
FalseisNotEmptyT(
C(
x1,
x2)) →
TrueisNotEmptyT(
V(
n)) →
FalseisNotEmptyT(
N) →
FalseisEmptyT(
C(
x1,
x2)) →
FalseisEmptyT(
V(
n)) →
FalseisEmptyT(
N) →
Truefirst(
V(
n)) →
Nfirst(
C(
x1,
x2)) →
x1goal(
x) →
deeprev(
x)
Types:
revconsapp :: C:V:N → C:V:N → C:V:N
C :: C:V:N → C:V:N → C:V:N
deeprevapp :: C:V:N → C:V:N → C:V:N
V :: a → C:V:N
N :: C:V:N
deeprev :: C:V:N → C:V:N
second :: C:V:N → C:V:N
isVal :: C:V:N → False:True
False :: False:True
True :: False:True
isNotEmptyT :: C:V:N → False:True
isEmptyT :: C:V:N → False:True
first :: C:V:N → C:V:N
goal :: C:V:N → C:V:N
hole_C:V:N1_0 :: C:V:N
hole_a2_0 :: a
hole_False:True3_0 :: False:True
gen_C:V:N4_0 :: Nat → C:V:N
Lemmas:
revconsapp(gen_C:V:N4_0(n6_0), gen_C:V:N4_0(b)) → gen_C:V:N4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
Generator Equations:
gen_C:V:N4_0(0) ⇔ V(hole_a2_0)
gen_C:V:N4_0(+(x, 1)) ⇔ C(V(hole_a2_0), gen_C:V:N4_0(x))
The following defined symbols remain to be analysed:
deeprevapp
(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
deeprevapp(
gen_C:V:N4_0(
n958_0),
gen_C:V:N4_0(
b)) →
gen_C:V:N4_0(
+(
n958_0,
b)), rt ∈ Ω(1 + b + n958
0)
Induction Base:
deeprevapp(gen_C:V:N4_0(0), gen_C:V:N4_0(b)) →RΩ(1)
revconsapp(gen_C:V:N4_0(b), V(hole_a2_0)) →LΩ(1 + b)
gen_C:V:N4_0(+(b, 0))
Induction Step:
deeprevapp(gen_C:V:N4_0(+(n958_0, 1)), gen_C:V:N4_0(b)) →RΩ(1)
deeprevapp(gen_C:V:N4_0(n958_0), C(V(hole_a2_0), gen_C:V:N4_0(b))) →IH
gen_C:V:N4_0(+(+(b, 1), c959_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(13) Complex Obligation (BEST)
(14) Obligation:
Innermost TRS:
Rules:
revconsapp(
C(
x1,
x2),
r) →
revconsapp(
x2,
C(
x1,
r))
deeprevapp(
C(
x1,
x2),
rest) →
deeprevapp(
x2,
C(
x1,
rest))
deeprevapp(
V(
n),
rest) →
revconsapp(
rest,
V(
n))
deeprevapp(
N,
rest) →
restrevconsapp(
V(
n),
r) →
rrevconsapp(
N,
r) →
rdeeprev(
C(
x1,
x2)) →
deeprevapp(
C(
x1,
x2),
N)
deeprev(
V(
n)) →
V(
n)
deeprev(
N) →
Nsecond(
V(
n)) →
Nsecond(
C(
x1,
x2)) →
x2isVal(
C(
x1,
x2)) →
FalseisVal(
V(
n)) →
TrueisVal(
N) →
FalseisNotEmptyT(
C(
x1,
x2)) →
TrueisNotEmptyT(
V(
n)) →
FalseisNotEmptyT(
N) →
FalseisEmptyT(
C(
x1,
x2)) →
FalseisEmptyT(
V(
n)) →
FalseisEmptyT(
N) →
Truefirst(
V(
n)) →
Nfirst(
C(
x1,
x2)) →
x1goal(
x) →
deeprev(
x)
Types:
revconsapp :: C:V:N → C:V:N → C:V:N
C :: C:V:N → C:V:N → C:V:N
deeprevapp :: C:V:N → C:V:N → C:V:N
V :: a → C:V:N
N :: C:V:N
deeprev :: C:V:N → C:V:N
second :: C:V:N → C:V:N
isVal :: C:V:N → False:True
False :: False:True
True :: False:True
isNotEmptyT :: C:V:N → False:True
isEmptyT :: C:V:N → False:True
first :: C:V:N → C:V:N
goal :: C:V:N → C:V:N
hole_C:V:N1_0 :: C:V:N
hole_a2_0 :: a
hole_False:True3_0 :: False:True
gen_C:V:N4_0 :: Nat → C:V:N
Lemmas:
revconsapp(gen_C:V:N4_0(n6_0), gen_C:V:N4_0(b)) → gen_C:V:N4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
deeprevapp(gen_C:V:N4_0(n958_0), gen_C:V:N4_0(b)) → gen_C:V:N4_0(+(n958_0, b)), rt ∈ Ω(1 + b + n9580)
Generator Equations:
gen_C:V:N4_0(0) ⇔ V(hole_a2_0)
gen_C:V:N4_0(+(x, 1)) ⇔ C(V(hole_a2_0), gen_C:V:N4_0(x))
No more defined symbols left to analyse.
(15) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
revconsapp(gen_C:V:N4_0(n6_0), gen_C:V:N4_0(b)) → gen_C:V:N4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
(16) BOUNDS(n^1, INF)
(17) Obligation:
Innermost TRS:
Rules:
revconsapp(
C(
x1,
x2),
r) →
revconsapp(
x2,
C(
x1,
r))
deeprevapp(
C(
x1,
x2),
rest) →
deeprevapp(
x2,
C(
x1,
rest))
deeprevapp(
V(
n),
rest) →
revconsapp(
rest,
V(
n))
deeprevapp(
N,
rest) →
restrevconsapp(
V(
n),
r) →
rrevconsapp(
N,
r) →
rdeeprev(
C(
x1,
x2)) →
deeprevapp(
C(
x1,
x2),
N)
deeprev(
V(
n)) →
V(
n)
deeprev(
N) →
Nsecond(
V(
n)) →
Nsecond(
C(
x1,
x2)) →
x2isVal(
C(
x1,
x2)) →
FalseisVal(
V(
n)) →
TrueisVal(
N) →
FalseisNotEmptyT(
C(
x1,
x2)) →
TrueisNotEmptyT(
V(
n)) →
FalseisNotEmptyT(
N) →
FalseisEmptyT(
C(
x1,
x2)) →
FalseisEmptyT(
V(
n)) →
FalseisEmptyT(
N) →
Truefirst(
V(
n)) →
Nfirst(
C(
x1,
x2)) →
x1goal(
x) →
deeprev(
x)
Types:
revconsapp :: C:V:N → C:V:N → C:V:N
C :: C:V:N → C:V:N → C:V:N
deeprevapp :: C:V:N → C:V:N → C:V:N
V :: a → C:V:N
N :: C:V:N
deeprev :: C:V:N → C:V:N
second :: C:V:N → C:V:N
isVal :: C:V:N → False:True
False :: False:True
True :: False:True
isNotEmptyT :: C:V:N → False:True
isEmptyT :: C:V:N → False:True
first :: C:V:N → C:V:N
goal :: C:V:N → C:V:N
hole_C:V:N1_0 :: C:V:N
hole_a2_0 :: a
hole_False:True3_0 :: False:True
gen_C:V:N4_0 :: Nat → C:V:N
Lemmas:
revconsapp(gen_C:V:N4_0(n6_0), gen_C:V:N4_0(b)) → gen_C:V:N4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
deeprevapp(gen_C:V:N4_0(n958_0), gen_C:V:N4_0(b)) → gen_C:V:N4_0(+(n958_0, b)), rt ∈ Ω(1 + b + n9580)
Generator Equations:
gen_C:V:N4_0(0) ⇔ V(hole_a2_0)
gen_C:V:N4_0(+(x, 1)) ⇔ C(V(hole_a2_0), gen_C:V:N4_0(x))
No more defined symbols left to analyse.
(18) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
revconsapp(gen_C:V:N4_0(n6_0), gen_C:V:N4_0(b)) → gen_C:V:N4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
(19) BOUNDS(n^1, INF)
(20) Obligation:
Innermost TRS:
Rules:
revconsapp(
C(
x1,
x2),
r) →
revconsapp(
x2,
C(
x1,
r))
deeprevapp(
C(
x1,
x2),
rest) →
deeprevapp(
x2,
C(
x1,
rest))
deeprevapp(
V(
n),
rest) →
revconsapp(
rest,
V(
n))
deeprevapp(
N,
rest) →
restrevconsapp(
V(
n),
r) →
rrevconsapp(
N,
r) →
rdeeprev(
C(
x1,
x2)) →
deeprevapp(
C(
x1,
x2),
N)
deeprev(
V(
n)) →
V(
n)
deeprev(
N) →
Nsecond(
V(
n)) →
Nsecond(
C(
x1,
x2)) →
x2isVal(
C(
x1,
x2)) →
FalseisVal(
V(
n)) →
TrueisVal(
N) →
FalseisNotEmptyT(
C(
x1,
x2)) →
TrueisNotEmptyT(
V(
n)) →
FalseisNotEmptyT(
N) →
FalseisEmptyT(
C(
x1,
x2)) →
FalseisEmptyT(
V(
n)) →
FalseisEmptyT(
N) →
Truefirst(
V(
n)) →
Nfirst(
C(
x1,
x2)) →
x1goal(
x) →
deeprev(
x)
Types:
revconsapp :: C:V:N → C:V:N → C:V:N
C :: C:V:N → C:V:N → C:V:N
deeprevapp :: C:V:N → C:V:N → C:V:N
V :: a → C:V:N
N :: C:V:N
deeprev :: C:V:N → C:V:N
second :: C:V:N → C:V:N
isVal :: C:V:N → False:True
False :: False:True
True :: False:True
isNotEmptyT :: C:V:N → False:True
isEmptyT :: C:V:N → False:True
first :: C:V:N → C:V:N
goal :: C:V:N → C:V:N
hole_C:V:N1_0 :: C:V:N
hole_a2_0 :: a
hole_False:True3_0 :: False:True
gen_C:V:N4_0 :: Nat → C:V:N
Lemmas:
revconsapp(gen_C:V:N4_0(n6_0), gen_C:V:N4_0(b)) → gen_C:V:N4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
Generator Equations:
gen_C:V:N4_0(0) ⇔ V(hole_a2_0)
gen_C:V:N4_0(+(x, 1)) ⇔ C(V(hole_a2_0), gen_C:V:N4_0(x))
No more defined symbols left to analyse.
(21) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
revconsapp(gen_C:V:N4_0(n6_0), gen_C:V:N4_0(b)) → gen_C:V:N4_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
(22) BOUNDS(n^1, INF)